package com.iwuke.dance.wallet.settings;

import android.view.View;
import android.widget.TextView;

import com.iwuke.dance.R;
import com.iwuke.dance.activity.BaseActivity;
import com.iwuke.dance.gadget_view.TitleBarView;
import com.iwuke.dance.util.Util;
import com.iwuke.dance.util.merchants_connect.NetworkEvent;

import de.greenrobot.event.Subscribe;
import de.greenrobot.event.ThreadMode;

/**
 * @author: 魏从响
 * @date: 2025/10/9
 * 支付密码
 */
public class PaymentPasswordActivity extends BaseActivity implements View.OnClickListener {

    private TitleBarView title_bar;
    private TextView tv_verify_payment_password;
    private TextView tv_sms_verification_code;

    /**
     * @description 网络实时监听
     */
    @Subscribe(threadMode = ThreadMode.MainThread)
    public void onEvent(NetworkEvent networkEvent){
        BaseActivity.setConnect(PaymentPasswordActivity.this,networkEvent,title_bar);
    }

    @Override
    protected int getView() {
        return R.layout.activity_payment_password;
    }

    @Override
    protected void init(View mView) {
        title_bar = findViewById(R.id.title_bar);
        //验证支付密码
        tv_verify_payment_password = findViewById(R.id.tv_verify_payment_password);
        //短信验证码
        tv_sms_verification_code = findViewById(R.id.tv_sms_verification_code);


        title_bar.setTitleText("修改支付密码");
        title_bar.setLeftOnClick(this);
        //验证支付密码
        tv_verify_payment_password.setOnClickListener(this);
        //短信验证码
        tv_sms_verification_code.setOnClickListener(this);
    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {
        if (v.getId()==R.id.img_left){
            finish();
        }else if (v.getId()==R.id.tv_verify_payment_password){//验证支付密码
            Util.setIntent(PaymentPasswordActivity.this,VerifyPaymentPasswordActivity.class);
        }else if (v.getId()==R.id.tv_sms_verification_code){ //短信验证码
            Util.setIntent(PaymentPasswordActivity.this,SMSVerificationCodeActivity.class);
        }
    }
}
